home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / RIGHT.dxr / 00144.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  705 b   |  18 lines

  1. on enterFrame
  2.   set the floatPrecision to 5
  3.   set x0 to the right of sprite 4 - the left of sprite 4
  4.   set y0 to the bottom of sprite 6 - the top of sprite 6
  5.   set r0 to sqrt((x0 * x0) + (y0 * y0))
  6.   put integer(180.0 / PI * float(atan(float(y0) / float(x0)))) into field "Ang1"
  7.   put r0 into field "R1"
  8.   put x0 into field "X1"
  9.   put y0 into field "Y1"
  10.   set the floatPrecision to 2
  11.   put float(float(y0) / float(r0)) into field "Sine"
  12.   put float(float(x0) / float(r0)) into field "Cosine"
  13.   put float(float(y0) / float(x0)) into field "Tangent"
  14.   set the floatPrecision to 5
  15.   set the locV of sprite 15 to the locV of sprite 8 - 3
  16.   set the locV of sprite 13 to the top of sprite 4 - (y0 / 2) - 30
  17. end
  18.